/*
 * FW_protocol_def.h
 *
 */

#ifndef FW_PROTOCOL_DEF_H_
#define FW_PROTOCOL_DEF_H_

/* FlexWire definition */


/* DEV_ADDR byte */
#define DEVICE_ADDR__0         (0x00)
#define DEVICE_ADDR__1         (0x01)
#define DEVICE_ADDR__2         (0x02)
#define DEVICE_ADDR__3         (0x03)
#define DEVICE_ADDR__4         (0x04)
#define DEVICE_ADDR__5         (0x05)
#define DEVICE_ADDR__6         (0x06)
#define DEVICE_ADDR__7         (0x07)
#define DEVICE_ADDR__8         (0x08)
#define DEVICE_ADDR__9         (0x09)
#define DEVICE_ADDR__10        (0x0A)
#define DEVICE_ADDR__11        (0x0B)
#define DEVICE_ADDR__12        (0x0C)
#define DEVICE_ADDR__13        (0x0D)
#define DEVICE_ADDR__14        (0x0E)
#define DEVICE_ADDR__15        (0x0F)

// Broadcast mode - (Bit 6)
#define BROADCAST              (0x40)      /* Broadcast (DEVICE_ADDR = 0x00) */
#define SINGLE_DEVICE_MODE     (0x00)
#define BROADCAST_MODE         (BROADCAST)
// Read/Write mode - (Bit 7)
#define READ                   (0x00)      /* Read mode */
#define WRITE                  (0x80)      /* Write mode */
#define READ_MODE              (READ)
#define WRITE_MODE             (WRITE)

#endif /* FW_PROTOCOL_DEF_H_ */
